const mongoose = require('mongoose');
const { exerciseModel } = require('./../models/exerciseModel');

module.exports.getOneTitle = function(req,res) {
    const result = mongoose.model(exerciseModel).find(req.body);
    console.log(result);
    if(result){
        res.send({
            code: 1,
            message: '题目信息获取成功',
            result: result

        });
    }else{
        res.send({
            code: 0,
            message: '题目信息获取失败'
        })
    }
}